home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Go64!
/
Go64_1998-04_1998_CSW_Side_B.d64
/
demo3 .mbs
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
2KB
|
47 lines
10 rem *** midi-basic sequenzer-demo ***
20 rem
30 rem *** sq(a,b): sequenznr, datum
40 rem *** rp(a) : wiederholg. seq a
50 rem *** l(a) : laenge seq a
60 rem *** ma : hoechste note
70 rem *** mi : tiefste note
80 rem *** s : geschwindigkeit
90 rem *** t : pitch-transpose
100 rem ** p : midi-programmnummer
110 rem
120 dim sq(10,64),rp(10),l(10)
130 (NULL):(NULL) 1,1
140 (NULL):(NULL) 1,4:printchr$(14)"*** [205][201][196][201][194][193][211][201][195] [211]equenzer-[196]emo ***"
150 nz=-2:sz=1
160 read n,d:if n>ma then ma=n
170 if n>-1 then nz=nz+2:sq(sz,nz)=n:sq(sz,nz+1)=d:goto 160
180 if n<-1 then rp(sz)=-n:l(sz)=nz:nz=-2:sz=sz+1:goto160
190 if n=-1 then sz=sz-1
200 (NULL) 18,9:print" "
210 (NULL) 5,1:input"[208]rogrammnummer ";p:if p<0 or p>127 then 210
220 (NULL) 7,1:input"[199]eschwindigkeit ";s:if s<=0 then 220
230 (NULL) 9,1:input"[201]ntervallverschiebung ";t:if ma+t>127 or mi+t<0 then 230
240 (NULL) 15,2:print"[[211][208][193][195][197]] = [206]eustart [[210][197][212][213][210][206]] = [197]nde"
250 (NULL) 18,13:print"[194]itte [215]arten..."
260 (NULL) 1,p
270 (NULL) 18,9:print"[196]emonstration laeuft..."
280 for a=1 to sz:for b=1 to rp(a):for c=0 to l(a) step 2
290 get a$:if a$=chr$(13) then :(NULL) 1,1:(NULL):end
300 if a$=" " then :(NULL) 1,1:goto 200
310 (NULL) 1,sq(a,c)+t,64:for d=0 to sq(a,c+1) step s:next d:(NULL) 1,sq(a,c)+t,64
320 next c:next b:next a:goto 280
330 rem
340 rem *** musikdaten ***
350 rem
360 rem *** 24,100: note, dauer
370 rem *** -4,-4 : seq-wiederholungen
380 rem *** -1,-1 : endekennzeichen
390 rem
400 data 24,100,36,100,34,100,31,100,-4,-4
410 data 29,100,41,100,39,100,36,100,-4,-4
420 data 24,100,36,100,34,100,31,100,-4,-4
430 data 31,100,43,100,41,100,38,100,-2,-2
440 data 29,100,41,100,39,100,36,100,-2,-2
450 data 24,100,36,100,34,100,31,100,-4,-4
460 data -1,-1